<!DOCTYPE html>
<html lang="en">
<head>
<title>3D.CITY helicopter</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
html { width:100%; height:100%; }
body {  padding:0; margin: 0px; background:#6666e6; font:12px sans-serif; width:100%; height:100%; color:#fff; overflow: hidden;}
#debug{ position:absolute; padding:10px; right:0; bottom:0; text-align:right; width:20%; pointer-events:none; display:block; }
#log{ position:absolute; padding:10px; left:0; bottom:0; width:30%; pointer-events:none; display:block;}
#hub{ position:absolute; top:0; left:0; height:100%; width:100%; pointer-events:none; display:block; text-align:center;}
#top{ position:absolute; top:10px; left:10px; height:20px; width:100px; pointer-events:auto; cursor:pointer; display:block; text-align:center; font-size: 16px; background: #606060; padding: 10px;}
#destroy{ position:absolute; top:60px; left:10px; height:20px; width:100px; pointer-events:auto; cursor:pointer;  display:block; text-align:center; font-size: 16px; background: #404040; padding: 10px;}
#burn{ position:absolute; top:110px; left:10px; height:20px; width:100px; pointer-events:auto; cursor:pointer;  display:block; text-align:center; font-size: 16px; background: #cc4040; padding: 10px;}
#hud{ position:absolute; top:50%; left:50%; height:440px; width:440px; margin-left:-220px; margin-top:-220px; pointer-events:none; display:block;}
</style>

<script src="js/three.min.js"></script>
<script src="js/sea3d.min.js"></script>
<script src="src3d/view3d.js"></script>
<script src="src3d/hub.js"></script>
<script src="src3d/helicopter.js"></script>

</head>
<body>
<div id="container"></div>
<div id="debug">pre alpha 0.76</div>
<div id="log">loth 2014</div>
<div id="hub"></div>
<object class="hud" id="hud" width="440" height="440" type="image/svg+xml" data="img/hud.svg"></object>
<script>
var l = document.getElementById('log');
var view3d;
var helico;
var hub = null;

window.onload = init;

function init(){
    view3d = new V3D.Base();
    //start();
}

function log(txt){ l.innerHTML = txt || '';  }

function start() {

	loop();

	view3d.center = new THREE.Vector3(0,1,0);
	view3d.cam.distance = 2;
	view3d.cam.vertical = 85;
    view3d.moveCamera();

    helico = new V3D.helicopter(view3d);
}

function loop() {
	requestAnimationFrame( loop );
    //view3d.renderer.render( view3d.scene, view3d.camera );
    if(helico) helico.fly();
    view3d.render();

}
</script>
</body>
</html>